<template>
  <div class="order-header">
    <div class="container clearfix">
      <div class="header-logo">
        <a href="/#/index"></a>
      </div>
      <div class="title">
        <h2>{{title}}<slot name="tip"></slot></h2>
      </div>
      <div class="username">
        <a href="javascrtipt:;">{{username}}</a>
      </div>
    </div>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: "order-header",
  props:{
    title:String
  },
  computed:{
    ...mapState(['username'])
  },
  components: {},
  data() {
    return {};
  },
  methods: {},
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>

<style lang='scss'>
//@import url()
  .order-header{
   padding: 30px 0;
   border-bottom: 2px solid #ff6600;
    .header-logo{
      float: left;
    }
    .title,.username{
      display: inline-block;
      height: 55px;
      line-height: 55px;
    }
    .title{
      float: left;
      margin-left: 54px;
      h2{
        font-size: 28px;
        color: #333;
      }
      span{
        font-size: 14px;
        margin-left: 17px;
        color: #999;
        font-weight:200;
      }
    }
    .username{
      float: right;
      a{
        color: #666;
        font-size: 16px;
      }
    }
  }
</style>